]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
network: show ad-hoc icon for ad-hoc networks
authorDan Winship <danw@gnome.org>
Thu, 7 Apr 2011 21:21:08 +0000 (17:21 -0400)
committerDan Winship <danw@gnome.org>
Mon, 11 Apr 2011 14:42:22 +0000 (10:42 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=646141

js/ui/status/network.js

index ed8e712eeaf85b7108ffdfd103cfa3404a4e8ce0..a5b8a14c7ccd2000ff6c31a14a6cbd868678af11 100644 (file)
@@ -140,7 +140,10 @@ NMNetworkMenuItem.prototype = {
     },
 
     _getIcon: function() {
-        return 'network-wireless-signal-' + signalToIcon(this.bestAP.strength);
+        if (this.bestAP.mode == NM80211Mode.ADHOC)
+            return 'network-workgroup';
+        else
+            return 'network-wireless-signal-' + signalToIcon(this.bestAP.strength);
     },
 
     updateAccessPoints: function(accessPoints) {
@@ -2075,7 +2078,7 @@ NMApplet.prototype = {
                     let ap = dev.device.active_access_point;
                     let mode = dev.device.mode;
                     if (!ap) {
-                        if (mode != NetworkManager['80211Mode'].ADHOC) {
+                        if (mode != NM80211Mode.ADHOC) {
                             log('An active wireless connection, in infrastructure mode, involves no access point?');
                             break;
                         }